home *** CD-ROM | disk | FTP | other *** search
/ Hunter 2006 / Hunter 2006.iso / soft / sleipnir241.exe / {app} / scripts / ƒŠƒ“ƒNˆ— / OK_V‚µ‚¢ƒEƒBƒ“ƒhƒE‚ÅŠJ‚­.js < prev   
Text File  |  2006-06-15  |  1KB  |  63 lines

  1. /***************************************************************
  2.  
  3.                 ÉVé╡éóâEâBâôâhâEé┼èJé¡üi2002/09/09üj
  4.                                         written by sleepy
  5.  
  6. ***************************************************************/
  7.  
  8.     var obj, document, id;
  9.  
  10.     var bActive = false;//èJéóé╜âEâBâôâhâEé≡âAâNâeâBâué╔é╡é╜éóÅΩìçé═ false é≡ true é╔ò╧ìX
  11.  
  12.     obj = new ActiveXObject("Sleipnir.API");
  13.     id = obj.GetDocumentID(obj.ActiveIndex);
  14.     document = obj.GetDocumentObject(id);
  15.  
  16.     if (document != null){
  17.         var frame, target, adr, wait;
  18.  
  19.         if (obj.IsBusy(id)){
  20.             do {
  21.                 WScript.Sleep(500);
  22.                 wait = wait + 500;
  23.             } while (obj.IsBusy(id) && (wait < 10000));// 10òbé┼â^âCâÇâAâEâg
  24.         }
  25.  
  26.         frames = document.frames;
  27.         if (frames.length != 0){
  28.             for (i=0; i<frames.length; i++){
  29.                 try {
  30.                     target = frames(i).document.activeElement;
  31.                     if (target.href != null){
  32.                         adr = target.href;
  33.                     }
  34.                     else {
  35.                         adr = "";
  36.                     }
  37.  
  38.                     if (adr != ""){
  39.                         obj.NewWindow(adr,bActive);
  40.                     }
  41.                 }
  42.                 catch(error) {
  43.                 }
  44.             }
  45.         }
  46.  
  47.         target = document.activeElement;
  48.         if (target.href != null){
  49.             adr = target.href;
  50.         }
  51.         else {
  52.             adr = "";
  53.         }
  54.  
  55.         if (adr != ""){
  56.             obj.NewWindow(adr,bActive);
  57.         }
  58.  
  59.         document = null;
  60.     }
  61.  
  62.     obj = null;
  63.